<?php

namespace App\Handler\Admin\Structure\Message;

if (!defined('IN_PX'))
    exit;

use App\Handler\Admin\AbstractCommon;
use Phoenix\Support\MsgHelper;
use Exception;

/**
 * 文档删除
 */
class Delete extends AbstractCommon {

    public function processRequest(Array & $context) {
        try {
            $this->db->beginTransaction();

            $this->_pushSetting();
           // $this->cache->delete($this->setting['messageDeleteCacheBindId']);

            echo($this->_publicDeleteFieldByPostItem($_POST['id'],
                array('`#@__@form`'),
                'id'));


            $this->db->commit();
        } catch (Exception $e) {

            $this->db->rollBack();
            echo(MsgHelper::json('DB_ERROR'));
        }
    }

}
